package it.ilgrv.demiurgo.persistence.tables.character;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the characterStatusLog database table.
 * 
 */
@Entity
public class CharacterStatusLog extends it.ilgrv.demiurgo.persistence.GenericTable implements Serializable {
	private static final long	serialVersionUID	= 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int					id;

	@Temporal(TemporalType.TIMESTAMP)
	private Date				date;

	private String				ip;

	private String				note;

	private int					version;

	@ManyToOne
	@JoinColumn(name = "to")
	private CharacterStatusType	to;

	@ManyToOne
	@JoinColumn(name = "from")
	private CharacterStatusType	from;

	// bi-directional many-to-one association to Character
	@ManyToOne
	private Character			character;

	public CharacterStatusLog() {
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public CharacterStatusType getFrom() {
		return this.from;
	}

	public void setFrom(CharacterStatusType from) {
		this.from = from;
	}

	public String getIp() {
		return this.ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getNote() {
		return this.note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public CharacterStatusType getTo() {
		return this.to;
	}

	public void setTo(CharacterStatusType to) {
		this.to = to;
	}

	public int getVersion() {
		return this.version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public Character getCharacter() {
		return this.character;
	}

	public void setCharacter(Character character) {
		this.character = character;
	}

}